package com.nxj.listener;

import com.nxj.factory.IOCFactory;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class MyListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        System.out.println("spring and springmvc init");
        try {
            IOCFactory.doAnnotation();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("spring and springmvc done");
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        System.out.println("serlvetContext destroyed");
    }
}
